<?php
/**
 * User: i@fedax.cn
 * Time: 2018/10/11 12:11
 */

namespace app\admin\model;


class NiceId extends DataBase
{
    protected $name = "nice_id";
//    protected $autoWriteTimestamp =  'true';
    protected $createTime = 'created_at';
    protected $updateTime = 'updated_at';

    public function getDataList()
    {
        $page_config = array(
            'page' => input('offset',1),
            'list_row' => input('limit',10)
        );
        $niceNum = input('niceNum');
        $where = '';
        if(!empty($niceNum))
            $where[] = ['nice_num','=',$niceNum];

        return $this
            ->where($where)
            ->order('id desc')
            ->paginate($page_config);
    }

}